import sys
sys.path.append("../common/acllite")

import os
import acl
import time
import numpy as np


import constants as const
from acllite_model import AclLiteModel
from acllite_resource import AclLiteResource


def main():
    
    acl_resource = AclLiteResource(device_id=0)
    acl_resource.init()
    
    float_len = 4
    output_info = [300 * float_len * 32 * 32]
    
    model = AclLiteModel("OM/dynamic_dims_linux_x86_64.om", output_info=output_info)
    
    input_datas = np.random.randint(1, 32, (32, 32, 80))/1000.0
    input_datas = input_datas.astype(np.float32)
    
    result_list = model.execute([input_datas,], mdl_type=const.MDL_DYNAMIC_SHAPE)
    print(len(result_list))
    print(result_list[0].shape)
    

if __name__ == "__main__":
    main()
